<link rel="stylesheet" href="ccay/example/demo.css"  type="text/css" />
<script type="text/javascript" src="ccay/example/demo.js" charset="utf-8"></script>
<script type="text/javascript">
<!--
$("#opDemo").ccayTab();
//-->
</script>
<div id="opDemo">
    <div title='异步' tabid='tab1'>
	     <h3> 本页demo以Ccay.doGet作为例子</h3>
	     <div class='codeArea'>
	     <pre>
Ccay.doGet = function(url, data, sucessCallback, failCallback, fnBeforSend,autoLoading) {
	Ccay.Core._ajax("GET", url, data, sucessCallback, failCallback,
						fnBeforSend, autoLoading);
};</pre>
		 </div>	
		 
		<div>
		该方法默认是异步处理，<p>
		url传的是string参数 <p>
		data为url的参数 <p>
		</div> 
		<br>
		<h3>如：</h3>	
		<div class='codeArea'>
		  <pre>
Ccay.doGet("services/ccay/registry/query/single/noassert/Ccay.HtmlArea.SourceEditMode/true",
 	        "",
			function(data){alert(1)},
			function(data){alert(2)}
);	
		  </pre>
		</div>
    </div>	
    <div title="同步" tabid='tab2'>
      <div class='codeArea'>
      <pre>
Ccay.doGet = function(url, data, sucessCallback, failCallback, fnBeforSend,autoLoading) {
	Ccay.Core._ajax("GET", url, data, sucessCallback, failCallback,
						fnBeforSend, autoLoading);
};</pre>
	 </div>	
	 
	<div>
	 要设置为同步类型，值需要把url设置为复杂类型参数, 以url作为$.ajax(op) 的op，
	
	<pre>
以下设置和ajax的op设置一致，只需设置async:false

url = {
		<font color="red">async:false, // 设置同步，true为异步</font>
		url : url, //
		data : data,
		success : sucessCallback,
		error : failCallback,
		beforeSend : fnBeforSend,
		loading : autoLoading
 }
	</pre>
	</div> 
	<br>
	<h3>如：</h3>	
	<div class='codeArea'>
	  <pre>
	Ccay.doGet({
	    async:false,
	    url:"services/ccay/registry/query/single/noassert/Ccay.HtmlArea.SourceEditMode/true",
	    data:"",
	    success : function(data){alert(1)},
	    error : function(data){alert(2)},
	    loading : true
	});		  
	  </pre>
	</div>	
		
    </font>
    </div>		
    <div title="FAQ" tabid="tab4">
	  <form class="init ccay-form">	
		<div class="ccay-form-body ccay-form-custom">
			<ul>						
			    <li class="ccay-form-row">
			        <samp><h3>问题</h3></samp>
					<span class="ccay-form-input">
						<h3>解决方案</h3>
					</span>
				</li>
				<!-- 若问题和内容较多，可在li中的class加上ccay-form-whole -->
				<li class="ccay-form-row">
				    <samp class="i18n" i18nKey=""></samp>							    
					<span class="ccay-form-input"></span>
				</li>	
			</ul>
		</div>
	  </form>						
	</div>
</div>	 
